Refraction is the change in direction of a wave due to change in its speed. In optics, refraction occurs when a light wave, or ray, travels from a medium with a given refractive index to a medium with another refractive index at angle other than zero degrees or 90 degrees. Refraction is described by Snell's law, which states that the angle of incidence is related to the angle of refraction by:
            sin      ⁡              (                  θ          ⁢                                          ⁢          1                )                    sin      ⁡              (                  θ          ⁢                                          ⁢          2                )              =                    v        ⁢                                  ⁢        1                    v        ⁢                                  ⁢        2              =                  n        ⁢                                  ⁢        2                    n        ⁢                                  ⁢        1            where θ1 is the angle of incidence, θ2 is the angle of refraction, v1 and v2 are the wave velocities in the respective media, and n1 and n2 are the refractive indices of the respective media.
In computer graphics, most well designed computer generated (CG) characters have expressive eyes that help them engage emotionally with an audience. The eyes of a CG character can vary dramatically in their design. For example, eyes may be comprised of varying refractive indices, varying cornea sizes, and varying locations of the internal eye geometry including the pupil, iris, and lens. Big cartoony eyes may have large refraction indices. Without accounting for refraction, the internal eye geometry of such a character will appear different when viewed from a particular position than when refraction is taken into account. Moreover, because of refraction, the actual gaze direction of a character's eye depends on the relative location of the internal eye geometry with respect to a camera position and view.